from typing import Iterator
from agno.agent import Agent, RunResponse
from agno.models.deepseek import DeepSeek
from agno.utils.pprint import pprint_run_response

agent = Agent(model=DeepSeek(id="deepseek-chat"))

# Run agent and return the response as a variable
response: RunResponse = agent.run("告诉我一个关于机器人的短故事")
# Run agent and return the response as a stream
response_stream: Iterator[RunResponse] = agent.run(
    "告诉我一个关于狮子的短故事", stream=True
)

# Print the response in markdown format
pprint_run_response(response, markdown=True)
# Print the response stream in markdown format
pprint_run_response(response_stream, markdown=True)
